<script lang="ts" setup>
const clickHandle = () => {
  alert('点击成功')
}
const onMouseenter=()=> {
  console.log('移入')
}
const onMouseleave=()=> {
  console.log('移出')
}
</script>

<template>
<button @click="clickHandle()">按钮</button>
<div class="box" @mouseenter="onMouseenter()" @mouseleave="onMouseleave()">鼠标移入移出</div>
</template>

<style scoped>
.box{
  width: 100px;
  height: 100px;
  background-color: #dd5a5a;
}
</style>
